/**
 * 班级管理初始化
 */
var LookReport = {
    id: "LookReportTable",	//表格id
    seItem: null,		//选中的条目
    table: null,
    layerIndex: -1
};

/**
 * 初始化表格的列
 */
LookReport.initColumn = function () {
    return [
            {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
            {title: '学校代号', field: 'schoolCode', visible: true, align: 'center', valign: 'middle'},
            {title: '所在班级', field: 'className', visible: true, align: 'center', valign: 'middle'},
            {title: '报名人数', field: 'examineeNum', visible: true, align: 'center', valign: 'middle'},
            {title: '未填报志愿人数', field: 'nowriteNum', visible: true, align: 'center', valign: 'middle'},
            {title: '已填报志愿人数', field: 'thenwriteNum', visible: true, align: 'center', valign: 'middle'},
            {title: '已放弃志愿人数', field: 'abandonedNum', visible: true, align: 'center', valign: 'middle'},
            {title: '未确认志愿人数', field: 'noconfirmNum', visible: true, align: 'center', valign: 'middle'},
            {title: '已确认志愿人数', field: 'thenconfirmNum', visible: true, align: 'center', valign: 'middle'},
            {title: '上报状态', field: 'statusName', visible: true, align: 'center', valign: 'middle'},
            {title: '汇总日期', field: 'modifyTime', visible: true, align: 'center', valign: 'middle'}
    ];
};

/**
 * 获取shoolId
 */
LookReport.getSchoolId=function(schoolSelectId){
	return {
		schoolId:$("#"+schoolSelectId).select2("val")
	}
}

$('#seniorSchoolId').on('select2:select', function (e) {
	$("#seniorClassId").val("").trigger("change");
});

LookReport.resetSearch = function () {
    $("#seniorSchoolId").val("").trigger("change");
    $("#seniorClassId").val("").trigger("change");
    LookReport.search();
}
/**
 * 查询班级列表
 */
LookReport.search = function () {
    var queryData = {};
    queryData['seniorSchoolId'] = $("#seniorSchoolId").val();
    queryData['seniorClassId'] = $("#seniorClassId").val();
    LookReport.table.refresh({query: queryData});
};

$(function () {
    var defaultColumns = LookReport.initColumn();
    var table = new BSTable(LookReport.id, "/seniorWish/lookReportList", defaultColumns);
    table.setIsShowSelect(false);
    LookReport.table = table.init();
});
